﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JM.JCY.Common
{
    public class JCYConstant
    {

        public static class SharePointListName
        {
            public const string NewsPictureLibrary = "NewsPic";
            public const string PublicDocumentLibrary = "综合资料库";
            public const string PublicTemplateDocumentLibrary = "文档标准模板库";
            public const string PublicPictureLibrary = "公共照片库";
                   
            public const string LawCaseSafetyTable = "自侦案件安全办案情况对照检查表";
            public const string PropertyRecord = "财产情况";
            public const string DownloadCenter = "下载中心";
            public const string QuickLinkList = "常用链接";
            public const string DiscussionList = "讨论中心";
            public const string DepartmentInfoList = "部门文化风险综合表";

            // add by Hong Liang 2012-05-02
            public const string Attachment = "Attachment";
            // added */* modified by Hong Liang 2012-06-01

            #region 执法档

            public const string LawCaseQualityDoc = "办案质量效果情况";
            public const string LawCaseAssesement = "执法办案风险评估预警";
            public const string LawCaseBasic = "执法办案风基本情况";


            #endregion

            #region 廉政档

            public const string MinZhuShengHuo = "民主生活会发言提纲";
            public const string RefuseCheck = "拒说情拒收礼拒吃请简明情况登记表";
            public const string LingDaoDangLuoShiCheck = "领导干部落实党风廉政建设责任状情况报告";
            public const string DangFengLianZhengCePing = "党风廉政建设民主测评情况";
            public const string ShuZhiShuLianReport = "述职述廉报告";
            public const string IncorruptRisk = "廉政风险排查防范情况";
            public const string InspectionRecord = "检务督察记录情况";
            public const string DisciplineDocumentLibrary = "检风检纪记录情况";

            #endregion

            #region 绩效档



            #endregion

            #region 个人档



            #endregion

        }



        public static class Status
        {
            public const string Draft = "Draft";
            public const string Publish = "Publish";
            public const string Pending = "Pending";
            public const string Finish = "Finish";
        }

        public static class ReadStatus
        {
            public const string Read = "Read";
            public const string UnRead = "UnRead";
        }

        // add by Hong Liang for null date value
        public static string nullDate = "1970-01-01";

        public static string defualtPW = "123456";

        public static string Date_Format_CN = "yyyy年MM月dd日";

        public static string RowLimit = "RowLimit";

        public static string DisplayCount = "6";

        #region Generic (Apply throughout OCP)

        public static string DateFormatShortDate = "dd/MM/yyyy";
        public static string DateFormatShortTime = "HH:mm";
        public static string DateTimeFormatShort = "dd/MM/yyyy HH:mm";
        public const string DropdownlistEmptyText = "-- Select --";
        public const string DropdownlistAllText = "All";
        public const string ErrorLogPath = "/_layouts/JM.JCY.Resource/JCYLog/";
        public const string ConcurrentUpdatedErrorMessage = "Record has been updated by another user. Please retrieve record and try again.";

        public static string DateFormatDate = "dd MMM yyyy";
        public static string DateFormatShortTimeFor12Hours = "hh:mm tt";

        public enum ContextType
        {
            Staff,
            WorkGroup,
            Committee
        }

        /// <summary>
        /// For jQuery <-> WCF via AJAX
        /// </summary>
        public static class HTTPRequestHeader
        {
            public const string OCPStaffID = "OCPStaffId";
        }

        public static class UserAgentType
        {
            public const string iPhone = "iphone";
            public const string iPad = "ipad";
            public const string BlackBerry = "blackberry";
            public const string NormalBrowser = "normalbrowser";
        }

        public static class Handler
        {
            public const string WorkGroup = "/_layouts/JM.JCY.Resource/Handlers/WorkGroupHandler.ashx";
            public const string Committee = "/_layouts/JM.JCY.Resource/Handlers/CommitteeHandler.ashx";
        }

        public static class Validation
        {
            public static class Msg
            {
                public const string RequiredField = "Input cannot be empty.";
                public const string FileType = "File format is not valid or supported.";
                public const string ExceedMaxFileSize = "File uploaded exceeds the maximum size allowed.";
                public const string DuplicateRecord = "Record already exists.";
            }

            public static class Config
            {
                public const int MaxFileSize = 4194304; //4mb //1048576; //1mb
            }
        }

        public static class ViewAllUrl
        {
            public const string Committee = "committee/ViewAllCommittee.aspx";
            public const string WorkGroup = "workgroup/ViewAllWorkGroup.aspx";
            public const string Notification = "notifications/ViewAllNotifications.aspx";
            public const string Application = "OCPContextWebSite/mohpages/apps/ViewAllApplications.aspx";
        }

        public static class LikeObjectType
        {
            public const string Post = "Post";
            public const string SharepointObject = "SharepointObject";
        }

        public static class SiteName
        {
            public const string MySite = "检察院";
            public const string MyDept = "MyDept";
            public const string MyCommittee = "MyCommittee";
            public const string PersonalSite = "PersonalSite";
        }

        public static string MemberGroup = "检察院成员";

        //zm
        public static class SiteUrlName
        {
            public const string MySite = "MySite";
            public const string MyDept = "MyDept";
            public const string MyCommittee = "MyCommittee";
        }

        //zm
        public static class PhotoListName
        {
            public const string PublicPhoto = "PublicPhoto";
            public const string WorkgroupPhoto = "WorkgroupPhoto";
            public const string CommitteePhoto = "CommitteePhoto";
            public const string PersonalPhoto = "PersonalPhoto";
        }

        public static class CodeCategory
        {
            public const string EmploymentTerm = "EMPLOYMENT TERM";
            public const string SupervisorLevel = "SUPERVISOR LEVEL";
        }

        public static class ApplicationName
        {
            public const string StaffDirectory = "Staff Directory";
            public const string Broadcast = "Broadcast";
            public const string OfficeServices = "Office Services";
            public const string RoomBooking = "Meeting Room Booking";
            public const string Subscription = "Subscription";
        }

        public static class ApplicationType
        {
            public const string FunWork = "Fun";
            public const string HeartWork = "Heart";
            public const string Mohipedia = "Mohipedia";
        }

        public static class OrgUnitType
        {
            public const string MyBranch = "MY BRANCHES";
            public const string MyDivision = "MY DIVISIONS";
            public const string MyGroup = "MY GROUPS";
        }

        public static class OrgUnitIcon
        {
            public const string Global = "/_layouts/JM.JCY.Resource/images/My Site icon-MS.png";
            public const string WorkGroup = "/_layouts/JM.JCY..Resource/images/My Div icon.png";
            public const string Committee = "/_layouts/JM.JCY.Resource/images/My Committee icon.png";
        }

        public static class SiteImageUrl
        {
            public const string Site_U = "/_layouts/JM.JCY.Resource/images/main_menu_MySite_U.png";
            public const string Site_S = "/_layouts/JM.JCY.Resource/images/main_menu_MySite_S.png";
            public const string WorkGroup_U = "/_layouts/JM.JCY.Resource/images/main_menu_MyWorkgroup_U.png";
            public const string WorkGroup_S = "/_layouts/JM.JCY.Resource/images/main_menu_MyWorkgroup_S.png";
            public const string Committee_U = "/_layouts/JM.JCY.Resource/images/main_menu_MyCommittee_U.png";
            public const string Committee_S = "/_layouts/JM.JCY.Resource/images/main_menu_MyCommittee_S.png";
        }

        public static class SiteUrl
        {
            public const string MySite = "/MySite/default.aspx?ContextId={0}";
            public const string MyWorkgroup = "/MyWorkgroup/default.aspx?ContextId={0}";
            public const string MyCommittee = "/MyCommittee/default.aspx?ContextId={0}";

            public static class Public
            {
                public const string MyWorkgroup = "/MyWorkgroup/MOHPages/WorkGroup/WorkGroupPublic.aspx?ContextId={0}&redirectContextId={1}";
                public const string MyCommittee = "/MyCommittee/MOHPages/Committee/CommitteePublic.aspx?ContextId={0}&redirectContextId={1}";
            }
        }

        public static class Pagination
        {
            public const int PageSize = 5;
            public const int ViewAllAlbumPageSize = 15;
            public const int RoomBookingPageSize = 10;
        }


        public static class Email
        {
            public static class OCPApplication
            {
                public const string OfficeServices = "OfficeServices";
                public const string RoomBooking = "RoomBooking";
            }
            public static class RoomBookingStatus
            {
                public const string Confirmed = "CONFIRMED";
                public const string WaitingListed = "WAITLISTED";
                public const string Rejected = "REJECTED";
            }
            public static class EmailType
            {
                public static class RoomBooking
                {
                    public const string CreateBooking = "Create Booking";  //Notification - 1.1
                    public const string EditBooking = "Edit Booking";  //Notification - 1.2
                    public const string CancelBooking = "Cancel Booking";  //Notification - 1.3
                    public const string CreateBooking_PartialSuccess = "Create Booking Partial success";  //Notification - 1.4
                    public const string CreateBooking_WaitingList = "Create Booking on Waiting List";  //Notification - 1.5 Send to new booking party
                    public const string EditBooking_WaitingList = "Edit Booking on Waiting List";  //Notification - 1.6 Send to new booking party
                    public const string CreateBooking_beplacedonWaitingList = "Create Booking be placed on Waiting List";  //Notification - 1.7 Send to earlier booking party
                    public const string EditBooking_beplacedonWaitingList = "Edit Booking be placed on Waiting List";  //Notification - 1.8 Send to earlier booking party
                    public const string Redeem_Cancel = "Auto Upgrade of  Booking";  //Notification - 1.9
                    public const string CreateBooking_RecurrentSuccess = "Recurrent with no overlap with other users' bookings";
                }

                public static class OfficeServices
                {
                    public const string CreateRequest = "Create Request";
                    public const string EditRequest = "Edit Request";
                    public const string CancelRequest = "Cancel Request";
                    public const string CloseRequest = "Close Request";
                }
            }
        }
        #endregion

        #region SharePoint Helper

        public static class SharepointObjectType
        {
            public const string AlbumType = "Album";
            public const string MediaType = " Media";
        }

        public static class SharePointHelper
        {
            public const string FileNameFormat = "yyyyMMddhhmmssfff";
            public static class OutputTablePara
            {
                public const string FolderID = "FolderID";
                public const string ItemID = "ItemID";
                public const string OriginalImgUrl = "OriginalImgUrl";
                public const string ThumbNailImgUrl = "ThumbNailImgUrl";
                public const string OptimizeImgUrl = "OptimizeImgUrl";
            }
            public static class PicType
            {
                public const string Original = "Original";
                public const string ThumbNail = "ThumbNail";
                public const string Optimized = "Optimized";
            }
        }
        public static class SharePointPermission
        {
            public enum PermissionType
            {
                None,
                Read,
                Contribute
            }

            public const string DefaultGroup = "MOH Visitors";
        }
        #endregion

        #region Newsfeed zm

        public static class NewsfeedParams
        {
            public static class SharingOption
            {
                public const string All = "all";
                public const string Within = "within";
            }

            //一个Post 跟的Newsfeed，超过一个数量就只显示最近一定数量，看全部可以选显示全部。
            public const int DefaultPostContentNum = 10;
            public const int DefaultNewsfeedNum = 10;

            public static class PostContentImageSize
            {
                public const string ImageWidth = "90";
                public const string ImageHight = "70";
            }
        }


        #endregion

        #region Album zm
        public static class PhotoAlbum
        {
            public const string likeObjectType = "pic";
            public static class ApplicationTypeName
            {
                public const string PublicName = "Public";
                public const string WorkgroupName = "Workgroup";
                public const string CommitteeName = "Committee";
                public const string PersonalName = "Personal";
            }

            public static class FieldDisplayLength
            {
                public static class FunWorkHome
                {
                    public const int AlbumName = 10;
                    public const int AlbumOwner = 10;
                }

                public static class AlbumCategories
                {
                    public const int AlbumName = 25;
                    public const int AlbumOwner = 22;
                }
            }
        }
        #endregion

        #region Template

        #endregion

        #region FMS

        public static class FMS
        {
            public const string OfficeServicesSiteName = "/FMS";
            public const string OfficeServicesPicURL = "/FMS/OfficeServicesPic";

            #region OfficeServices
            public static class Picture
            {
                public const string DefaultPicturePath = "/FMS/OfficeServicesPic/_t/OfficeServicesDefault.png";
                public static string[] PicAllowedExtensions = new string[] { "bmp", "jpg", "gif", "png", "ico" };
                public const int File_MaxLength_Allowed = 4194304;//4M
            }

            public static class OfficeServices
            {
                public static class CodeCategory
                {
                    public const string RequestStatus = "OFFICE SERVICES REQUEST STATUS";
                    public const string Responsibility = "OFFICESERVICESRESPONSIBILITY";
                }

                public static class RequestStatus
                {
                    public const string Closed = "CLOSED";
                    public const string Pending = "PENDING";
                    public const string Cancelled = "CANCELLED";
                }

                public static class Responsibility
                {
                    public const string ManageRequests = "MR";
                    public const string GenerateReports = "GR";
                    public const string ConfigureOfficeServices = "COS";
                }

                public static class Picture
                {
                    public const int PictureSize = 4;
                    public const string PictureSizeUnit = "M";    //"K"(KB) or "M"(MB)
                }
            }
            #endregion

            #region Room Booking
            public static class RoomBooking
            {
                public static class RoomBookingStatus
                {
                    public const string Confirmed = "Confirmed";
                    public const string Cancelled = "Cancelled";
                    public const string Waiting = "Waiting List";
                }


                public static class CodeCategory
                {
                    public const string Category = "ROOMBOOKINGCATEGORY";
                    public const string Responsibility = "RESPONSIBILITY";
                }

                public static class Responsibility
                {
                    public const string GenerateReports = "GR";
                    public const string ConfigureMRB = "CMRB";
                    public const string ViewMyBooking = "VMB";
                }

                public const string RoomBookingSiteName = "/FMS";
                public const string RoomPicURL = "/FMS/RoomPic";

                public static class Picture
                {
                    public const int PictureSize = 4;
                    public const string PictureSizeUnit = "M";    //"K"(KB) or "M"(MB)
                }
            }

            #endregion
        }

        #endregion

        #region BroadCast
        public static class Broadcast
        {
            public static class BroadcastStatus
            {
                public const string Draft = "Draft";
                public const string Published = "Published";
                //public const string Cancelled = "Cancelled";
                public const string Removed = "Removed";
                public const string Withdrawn = "Withdrawn";
            }

            public static class CodeCategory
            {
                public const string Category = "BROADCASTCATEGORY";
                public const string Responsibility = "RESPONSIBILITY";
            }

            public static class Responsibility
            {
                public const string CreateBroadcast = "CB";
                public const string EditBroadcast = "EB";
                public const string RemoveBroadcast = "RB";
                //public const string GenerateReports = "GR";
            }

            public static class BroadcastHome
            {
                public const int DisplayBroadcastCount = 5;    //The number of broadcasts to be displayed in the Broadcast web part will be pre-configured to 5 (configurable).
                public const int DisplayBroadcastInterval = 5;    //The web part shall rotate the display of the broadcasts every 5 seconds (configurable).
            }

            public const string BroadcastSiteName = "/Broadcasts";
            public const string BroadcastPhotoURL = "/Broadcasts/BroadcastsPicture";

            public static class Picture
            {
                public const int PictureSize = 4;
                public const string PictureSizeUnit = "M";    //"K"(KB) or "M"(MB)
            }
        }

        #endregion
        #region Workgroup
        public static class Workgroup
        {
            public const string WorkgroupSiteName = "/MyWorkgroup";
            public static class DefaultImage
            {
                public const string WorkgroupLogo = "/MyWorkgroup/WorkgroupPic/_t/WorkgroupDefault_JPG.jpg";
            }
            public const string WorkgroupPhotoURL = "/MyWorkgroup/WorkgroupPic";
            public static string[] PicAllowedExtensions = new string[] { "jpg", "jpeg", "gif", "tif", "bmp", "png" };
        }
        #endregion

        #region Committee

        public static class DefaultImage
        {
            public const string CommitteeLogo = "/MyCommittee/CommitteePic/_t/CommitteeDefault_jpg.jpg";
        }

        #endregion

        #region Staff Profile

        public static class StaffProfile
        {
            public const string DefaultPicturePath = "/PersonalSite/UserPhoto/defaultImage.gif";
            public const string DefaultPicturePathMan = "/PersonalSite/UserPhoto/DefaultHeadMan.jpg";
            public const string DefaultPicturePathWoman = "/PersonalSite/UserPhoto/DefaultHeadWoman.jpg";

            public static class CodeCategory
            {
                public const string Responsibility = "STAFFPROFILERESPONSIBILITY";
                public const string OrgUnitLevel = "DIVISION LEVEL";
            }

            public static class Responsibility
            {
                //public const string CreateOrganisationStructure = "COS";
                //public const string EditOrganisationStructure = "EOS";
                //public const string RemoveOrganisationStructure = "ROS";
                public const string ViewOrganisationStructure = "VOS";
                public const string ViewOrganisationUnit = "VOU";
                public const string CreateStaffProfile = "CSP";
                public const string EditStaffProfile = "ESP";
                public const string RemoveStaffProfile = "RSP";
                //public const string ManageStaffTransfer = "MST";
            }

            public static class StaffStatus
            {
                public const string Active = "激活";
                public const string InActive = "未激活";
            }
        }

        #endregion

        #region mohipedia
        public static class MOHipedia
        {
            public const string SiteName = "MOHipedia";
            public const string PageLibraryName = "MOHipedia";
            public const string ObjectType = "MOHipedia";

            public static class Dashboard
            {
                public static class dbType
                {
                    public const string MostDiscussed = "Most Discussed";
                    public const string MostPopular = "Most Popular";
                    public const string MostViewed = "Most Viewed";
                    public const string RecentlyUpdated = "Recently Updated";
                }

                public const int PageSize = 4;
                public const int SummaryMaxLength = 100;

                public static class ViewMore
                {
                    public const string ViewMoreMOHipediaUrl = "/MOHipedia/ViewMoreMOHipedia.aspx?Type={0}&ContextId={1}";
                    public const int PageSize = 30;
                }
            }

            public static class SharingOption
            {
                public const string Within = "within";
                public const string All = "all";
                public const string AllEdit = "allEdit";
            }

            public static class TagCloud
            {
                public const int NumberOfTag = 10; //specify the top 10 tags to display
                public const int MinFontSize = 14;
                public const int MaxFontSize = 32;
                public const string TagUrl = "/_layouts/Categories.aspx?FieldName=Wiki_x0020_Page_x0020_Categories&FieldValue={0}&ListId={1}";
            }
        }
        #endregion

        #region Applications
        public static class Applications
        {
            public static class ApplicationType
            {
                public const string Intranet = "Intranet";
                public const string Internet = "Internet";
            }

            public static class Pagination
            {
                public const int PageSize = 7;
            }
        }
        #endregion

        #region SystemParameter

        public enum SystemParameterType
        {
            Notification,
            Newsfeed,
            Broadcast,
            StaffDirectory,
            OfficeServices,
            RoomBooking,
            BroadcastHome,
            Subscription
        }



        public enum SystemParameterName
        {
            X_Number_Notifications,
            Last_X_Days,
            Comment_Limited_Length,
            PageSize,
            Max_Months_Allowed,
            DisplayBroadcastCount,
            DisplayBroadcastInterval
        }
        #endregion

        #region OCPApplication

        public static class OCPApplication
        {
            public static string FunAtWork = "Fun@Work";
            public static string HeartAtWork = "Heart@Work";
            public static string Broadcast = "Broadcast";
            public static string MOHipedia = "MOHipedia";
            public static string StaffProfileMaintenance = "Staff Profile Maintenance";
        }

        #endregion
        #region Appointment

        public static class Appointment
        {
            public const string APPOINTMENT = "Appointment";
            public const string TYPE = "Type";

        }

        public static class Event
        {
            public const string EVENT = "Event";
            public const string CATEGORY = "Category";
        }

        #endregion
        #region Subscription
        public static class Subscription
        {
            public static class CodeCategory
            {
                public const string Responsibility = "RESPONSIBILITY";
            }

            public static class Responsibility
            {
                public const string EditSubscription = "ES";
            }
        }

        #endregion
        public static class Calendar
        {
            public const int TitleLength = 5;
            public static class ViewTypes
            {
                public const string ListView = "List View";
                public const string CalendarView = "Calendar View";
                public const int ListViewValue = 0;
                public const int CalendarViewValue = 1;
            }
        }
    }
}
